package com.bunnyhsu.service;

import com.bunnyhsu.dto.SuggestsWithPage;

import java.util.List;

/**
 * Created by xl on 2018/4/10.
 */
public interface SuggestService {

    //获取建议
    SuggestsWithPage getUnauditedSuggests(int page, int number);
    SuggestsWithPage getAuditedSuggests(int page, int number);
    SuggestsWithPage getRepliedSuggests(int page, int number);
    //获取记录页数（无搜索条件）
    Integer getPageOfSuggests(int state ,int number);
    Integer getPageOfSuggests(int state1 ,int state2 ,int number);

    //更新操作
    boolean updateSuggest2Audited(String reply, int type_id, int id);
    boolean updateSuggest2Replied(String reply, int type_id, int id);
    boolean updateSuggest2SceneReplied(int type_id, int id);

    //获取建议（根据时间）
    SuggestsWithPage getUnauditedSuggestsByDate(int page, int number, String up, String down);
    SuggestsWithPage getAuditedSuggestsByDate(int page, int number, String up, String down);
    SuggestsWithPage getRepliedSuggestsByDate(int page, int number, String up, String down);

    //获取记录页数（根据时间）
    Integer getPageOfSuggestsByDate(int state,int number, String up, String down);
    Integer getPageOfSuggestsByDate(int state1, int state2,int number, String up, String down);

    //用于查询-1和2的建议（根据时间和类型）
    SuggestsWithPage getUnionSuggestByDateAndType(int page, int number, String up, String down, int typeId);
    Integer getPageOfUnionSuggestsByDateAndType(int state1, int state2,int number, String up,
                                           String down, int typeId);

    Integer addSuggest(String content,String userId);
    List<com.bunnyhsu.model.Suggest> getRepliedSuggestByCommitterId(String userId);
}
